package org.zhi

import scala.util.matching.Regex

/**
 * @className: Match
 * @author: Administrator
 * @date: 2025-02-13 11:24
 */
object Match {
  def main(args: Array[String]): Unit = {
    val de = getStr("23432")
    println(de)

    val pattern = new Regex("(S|s)cala") // 首字母可以是大写 S 或小写 s
    val str = "Scala is scalable and coo1"
    println((pattern findAllIn str).mkString(","))
    //使用逗号，连接返回结果
  }

  def getStr(str: String): String ={
    str + "123fgg"
  }
}
